dxp-ux

(0 reviews)

queryUsageConsumption-TMF677 for CWC (Mobile)

/QueryUsageConsumption[GET]

Key considerations for CWC (flow markets)

  1. This is applicable for Mobile POSTPAID and Mobile PREPAID for liberate Customers only.
  2. For CWC Liberate postpaid, data will be retrieved from Liberate and Limeware for BUs(JM,VC,LC,GD,AG,TC,KY,AI,KN,MS,VG,DM). Limeware response gives SAPC balances, whereas liberate provides all balances/usage. Input parameters are service/subscriber number and account number. The response which has usageConsumption[].id are the usage retrieved from Liberate, remaining would be the SAPC balances retrieved from Limeware.
  3. To retrieve data from Liberate. Then service number need to be provided without country code and BU code for all BUs excluding JM. For Jamaica, the serviceNumber should be sent including BU code (i.e 876 for JM).
  4. Current implementation fetches the service level usage for the provided service number and also account level usage for the provided account number. In the response structure, the objects which have "logicalResource" object in usageConsumption arrayObject can be considered as service level usage, the objects which doesn't have "logicalResource" object and @type under usageConsumption arrayObject with name "AccountUsageConsumption" will be considered as account level usages.
  5. for CWC prepaid, data will be retrieved from Limeware for BUs(JM,VC,LC,GD,AG,TC,KY,AI,KN,MS,VG,DM). Limeware response gives all the prepaid balances/usage. Input parameters are service/subscriber number.
  6. For sample responses refer below examples:

    • Postpaid: CWC Liberate response
    • Prepaid: CWC Limeware response

URL

https://[localhost]:[port]/dxp-ux/v1/{businessId}/queryUsageConsumption

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (JM,VC,LC,GD,AG,TC,KY,AI,KN,MS,VG,DM) identifying the business unit.Y
namevaluedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.
Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request
Y

QueryParameter

namevaluedescriptionrequired
usageConsumption.logicalResource.idstringNeed to provide valid MSISDN or SubscriptionId valueY
searchCriteria.service.@typestringThis indicates the service line of business.
possible values are "PREPAID" and "POSTPAID"
Y
relatedParty.idstringunique identifier of the account.
Mandatory when businessIDs contains CWC (liberate) markets and searchCriteria.service.@type is POSTPAID
cond.Y
bucket.bucketRelationship.relationshipTypestringThis is used to fetch account level usages. If this query Param is not passed then only ServiceLevel Usages will be retrieved
Allowed Values are "BillingAccount"
N
[ 200 ] Prepaid (CWC Limeware Response)

Note: Below response is for both Retrieve Usage & Get remaining balance for the account.

OK - list request processed successfully, response body contains an entity corresponding to the requested resource.

[
    {
        "id": "",
        "queryUsageConsumptionDate": "2023-10-30T10:26:59.132-05:00",
        "searchCriteria": {
            "service": [
                {
                    "id": "18767911940",
                    "@type": "PREPAID"
                }
            ]
        },
        "usageConsumption": [
            {
                "bucketRefOrValue": [
                    {
                        "name": "Social Media",
                        "description": "Social Media",
                        "remainingValueName": "Social Media",
                        "status": "active",
                        "usageType": "Social Media",
                        "remainingValue": {
                            "amount": 10.00,
                            "units": "GB"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-03T12:00:14.000-05:00"
                        }
                    },
                    {
                        "name": "Spotify",
                        "description": "Spotify",
                        "remainingValueName": "Spotify",
                        "status": "active",
                        "usageType": "Internet",
                        "remainingValue": {
                            "amount": 2.50,
                            "units": "GB"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-03T12:00:14.000-05:00"
                        }
                    },
                    {
                        "name": "local Text",
                        "description": "Local Text",
                        "remainingValueName": "Local Text",
                        "status": "active",
                        "usageType": "Sms",
                        "remainingValue": {
                            "amount": 200,
                            "units": "SMS"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-03T12:00:14.000-05:00"
                        }
                    },
                    {
                        "name": "Intl",
                        "description": "USA Intl Mins",
                        "remainingValueName": "USA Intl Mins",
                        "status": "active",
                        "usageType": "Voice",
                        "remainingValue": {
                            "amount": 25,
                            "units": "mins"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-03T12:00:14.000-05:00"
                        }
                    },
                    {
                        "name": "not displayed",
                        "description": "not displayed",
                        "remainingValueName": "not displayed",
                        "status": "active",
                        "usageType": "Internet",
                        "remainingValue": {
                            "amount": 30.00,
                            "units": "KB"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-03T12:00:14.000-05:00"
                        }
                    },
                    {
                        "name": "Intl",
                        "description": "International Mins",
                        "remainingValueName": "International Mins",
                        "status": "active",
                        "usageType": "Voice",
                        "remainingValue": {
                            "amount": 1140,
                            "units": "mins"
                        },
                        "validFor": {
                            "endDateTime": "2023-11-16T13:06:14.000-05:00"
                        }
                    },
                    {
                        "name": "Core",
                        "description": "primaryBalance",
                        "remainingValueName": "primaryBalance",
                        "status": "active",
                        "usageType": "Core",
                        "remainingValue": {
                            "amount": 1814.94,
                            "units": "JMD"
                        },
                        "validFor": {
                            "endDateTime": "2023-12-04T12:00:11.000-05:00"
                        }
                    }
                ],
                "logicalResource": [
                    {
                        "id": "18767911940",
                        "@type": "MSISDN"
                    }
                ],
                "@type": "UsageConsumption"
            }
        ]
    }
]
[ 200 ] POSTPAID (CWC Liberate Response)

Note: Below response is for both Retrieve Usage & Get remaining balance for the account.

OK - list request processed successfully, response body contains an entity corresponding to the requested resource.

[
    {
        "id": "",
        "queryUsageConsumptionDate": "2024-08-23T09:38:05.899-04:00",
        "searchCriteria": {
            "service": [
                {
                    "id": "7865082",
                    "@type": "POSTPAID"
                }
            ]
        },
        "relatedParty": [
            {
                "id": "340085320000",
                "@type": "BillingAccount"
            }
        ],
        "usageConsumption": [
            {
                "id": "M-BCP-BASE-2",
                "bucketRefOrValue": [
                    {
                        "id": "3",
                        "isShared": false,
                        "name": "Anywhere Unlimited Texts",
                        "usageType": "Number of Calls",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Calls",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 1,
                                    "units": ""
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Calls",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 999999999999,
                                    "units": ""
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Calls",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0,
                                    "units": ""
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 999999999998,
                            "units": ""
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    },
                    {
                        "id": "1",
                        "isShared": false,
                        "name": "On-Net Unlimited Minutes",
                        "usageType": "Duration",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MINS"
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 16666666666.39,
                                    "units": "MINS"
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MINS"
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 16666666666.39,
                            "units": "MINS"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    },
                    {
                        "id": "2",
                        "isShared": false,
                        "name": "100 Anywhere Minutes",
                        "usageType": "Duration",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MINS"
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 33.20,
                                    "units": "MINS"
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Minutes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MINS"
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 33.20,
                            "units": "MINS"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    },
                    {
                        "id": "4",
                        "isShared": true,
                        "name": "250 MB Local Data",
                        "usageType": "Volume",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MBS"
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 83.33,
                                    "units": "MBS"
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MBS"
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 83.33,
                            "units": "MBS"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    }
                ],
                "logicalResource": [
                    {
                        "id": "7865082",
                        "@type": "MSISDN"
                    }
                ],
                "@type": "usageConsumption"
            },
            {
                "id": "M-BCP-D-10GB",
                "bucketRefOrValue": [
                    {
                        "id": "1",
                        "isShared": true,
                        "name": "10 GB Data",
                        "usageType": "Volume",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 3754.66,
                                    "units": "MBS"
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 3754.66,
                                    "units": "MBS"
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MBS"
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 0.00,
                            "units": "MBS"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    }
                ],
                "@type": "AccountUsageConsumption"
            },
            {
                "id": "M-BCP-D-50GB",
                "bucketRefOrValue": [
                    {
                        "id": "1",
                        "isShared": true,
                        "name": "50 GB Data",
                        "usageType": "Volume",
                        "bucketCounter": [
                            {
                                "counterType": "used",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 2289.62,
                                    "units": "MBS"
                                },
                                "@type": "UnitsUsed"
                            },
                            {
                                "counterType": "allocated",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 18773.33,
                                    "units": "MBS"
                                },
                                "@type": "UnitsAllocated"
                            },
                            {
                                "counterType": "carried",
                                "valueName": "Megabytes",
                                "consumptionPeriod": {
                                    "endDateTime": "2024-08-25T00:00:00.000-04:00"
                                },
                                "value": {
                                    "amount": 0.00,
                                    "units": "MBS"
                                },
                                "@type": "UnitsCarriedOver"
                            }
                        ],
                        "remainingValue": {
                            "amount": 16483.70,
                            "units": "MBS"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    }
                ],
                "@type": "AccountUsageConsumption"
            },
            {
                "bucketRefOrValue": [
                    {
                        "name": "internet",
                        "description": "Mobile Internet",
                        "remainingValueName": "Mobile Internet",
                        "status": "active",
                        "usageType": "Internet",
                        "remainingValue": {
                            "amount": 4.68,
                            "units": "GB"
                        },
                        "validFor": {
                            "endDateTime": "2024-08-25T00:00:00.000-04:00"
                        }
                    }
                ],
                "logicalResource": [
                    {
                        "id": "12687865082",
                        "@type": "MSISDN"
                    }
                ],
                "@type": "UsageConsumption"
            }
        ]
    }
]

Reviews